#ifndef BOARD_H_
#define BOARD_H_

#include "Point.h"
#include "Color.h"
#include <QGraphicsScene>
#include <QWidget>
#include <QGraphicsView>
#include <QPen>
#include <QColor>
#include <QMouseEvent>
#include <QDebug>
#include <QGraphicsRectItem>
#include <QTextStream>
#include "BattleGame.h"

class Board : public QGraphicsView {
	Q_OBJECT

	public:
		Board(int, int, QWidget*);
		~Board();
		
	public slots:
		void resetNormal(Arena*);
		void resetHide(Arena*);

	protected:
		void mouseDoubleClickEvent (QMouseEvent *);
		void mouseMoveEvent(QMouseEvent*);
		void mousePressEvent(QMouseEvent * event);
	
	signals:
		void focusOn(const Point<int>&);
		void leftClickOn(const Point<int>&);
		void rightClickOn(const Point<int>&);
		void doubleClickOn(const Point<int>&);
		
	private:
		QGraphicsScene* scene;
		QGraphicsRectItem*** caselle;
		int xMax;
		int yMax;
		QGraphicsRectItem* origin;
		//BattleGame* game;
		QImage* bkgr;
};

#endif
